function [ solvable ] = solvablePuzzle( s )
%SOLVABLEPUZZLE Summary of this function goes here
%   Detailed explanation goes here

    inverted = 0;
    for i=1:9
        for j=i+1:9
            if s(i)~=9
                if s(i)>s(j)
                    inverted = inverted + 1;
                end
            end
        end        
    end

    if mod(inverted,2)==0
        solvable = true;
    else
        solvable = false;
    end
end

